package cc.rengu.redp.bizimpl.upmp.service;

import cc.rengu.redp.common.domain.QueryRequest;
import cc.rengu.redp.bizimpl.upmp.domain.RegionInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
* @author LiuYuLiang.LL
*/
    public interface RegionInfoService extends IService<RegionInfo> {

    IPage<RegionInfo> findByPage(QueryRequest request, RegionInfo info);

    @Transactional
    void create(RegionInfo entity);

    @Transactional
    void update(RegionInfo entity);

    @Transactional
    void cancel(String id);

    @Transactional
    void delete(String[] ids);

    @Transactional
    RegionInfo findOneByCode(String regionCode, String status);

    RegionInfo findOneByCode(String regionCode);

    RegionInfo findByUkAndStatusAndPtCode(String regionCode, String status, String parentCode);

    List<RegionInfo> getByName(String regionName);

    List<Map> provinceAreaInfoSelect();

    Map<String, List<String>> getAREA_CD(List listPro);

    RegionInfo findPrncCityArea(String q, String p, String l);

    List<RegionInfo> findProvince(String regionLevel);

    List<RegionInfo> findCityOrArea(String cityOrAreaCode, String regionLevel);
}
